package com.gnerv.sylvanas.business.manage.model.bo;

import com.gnerv.sylvanas.business.manage.model.entity.ApiGroup;
import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * @author Gnerv LiGen
 */
@Data
public class ApiGroupBO {

    private String ukId;
    private String parentUkId;
    private String name;
    private Integer sort;

    public ApiGroup toApiGroup() {
        ApiGroup apiGroup = new ApiGroup();
        BeanUtils.copyProperties(this, apiGroup);
        apiGroup.setGmtCreate();
        apiGroup.setGmtModified();
        return apiGroup;
    }
}